
	 <button type="button" class="layui-btn layui-btn-normal layui-hide" id="fileList_#(objectId)">附件列表</button> 
	  ###<a href="javascript:" title="附件详情"><span id="fileNumber_#(objectId)" style="font-size: 13px;color:#424041">(#(fileList.size()) 点击详情)</span></a>
		<div class="layui-upload" id="table_#(objectId)" >
		  <div class="layui-upload-list" style="max-height:750px;overflow-y:auto;margin:0;">
		    <table class="layui-table">
		      <thead>
		      	<tr>
		      		<th>序号</th>
			      	<th>文件名</th>
			        <th>大小</th>
			        <th>时间</th>
			        <th>操作</th>
		      	</tr>
		      </thead>
		      <tbody id="uploadList">
		       #if(fileList)
	           #for(data:fileList)
	           <tr id="upload-#(for.index)">
	              <td>#(for.index+1)</td>
	              <td>#(data.file_name??)</td>
	              <td>#number(data.file_size/1024.0,"#.#")KB</td>
	              <td>#date(data.create_time??,"yyyy-MM-dd HH:mm:ss")</td>
	              <td>
	                #if(vs.code=='admin')
	              	<a href="javascript:downloadFile('#(data.url??)')" class="layui-btn layui-btn-xs">下载</a>
	              	#end
	              	<a href="javascript:previewFile('#(data.url??)','#(data.file_name??)')" class="layui-btn layui-btn-xs" >预览</a>
	              	#if(vs.code=='superadmin'||vs.code=='admin')
	              	###<a href="javascript:deleteFile('#(data.url??)','#(data.file_name??)','#(for.index)')" class="layui-btn layui-btn-xs layui-btn-danger .demo-delete" >删除</a>
	             	#end
	              </td>
	           </tr>
	           #end
	       	   #end
		      </tbody>
		    </table>
		  </div>
	
		</div> 
<script>
var n_#(objectId)=0;
//附件详情按钮
$('#fileNumber_#(objectId)').on('click', function(){
    if(n_#(objectId)==0){
  		$('#table_#(objectId)').removeClass('layui-hide');
  		n_#(objectId)=1;
	}else{
		$('#table_#(objectId)').addClass('layui-hide');
		n_#(objectId)=0;
	}
});
$('#fileList_#(objectId)').on('click', function(){
    if(n_#(objectId)==0){
  		$('#table_#(objectId)').removeClass('layui-hide');
  		n_#(objectId)=1;
	}else{
		$('#table_#(objectId)').addClass('layui-hide');
		n_#(objectId)=0;
	}
});
</script>

